package com.erb.mapper;

import com.erb.entity.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SmloadMapper {
	Apply SelectState(@Param("uid") int uid, @Param("loantype") String loantype, @Param("applyid") int applyid);

	List<Apply> selectapply(@Param("uid") int uid, @Param("applyid") String applyid);

	void AddSmloan(Apply apply);

	List<Apply> applylist();

	//获取uid
	Apply seluid(int id);

	//查询车辆信息s
	List<Carimf> carlists(int id);

	//查询房产信息
	List<Houseimf> Houselist(int id);

	//查询公积金
	List<Publicimf> publiclist(int id);

	//查询保险
	List<Insuranceimf> insurancelist(int id);

	//申请状态修改
	void updApply(@Param("state") int state, @Param("id") int id);

	//查询总行数
	int selProcount();

	//分页查询数据
	List<Apply> selApplyPage(@Param("starRow") int starRow, @Param("pageSize") int pageSize);

	void addloansubmit(Loan loan);


	Loan loanstate(@Param("uid") int uid, @Param("loantype") String loantype, @Param("applyid") int applyid);

	//查询所有贷款信息
	List<Loan> allloan();

	//查询所有贷款信息
	List<Loan> selectloan(int uid);

	//查询用户还贷款
	List<Loan> selectpayloan(@Param("uid") int uid, @Param("agree") int agree);

	//还款
	Loan payloan(int lid);

	//查看合同
	Loan hetongloan(@Param("lid") int lid, @Param("loantype") String loantype);

	//查看当前月份是否有要还款的信息
	Payloan loaning(int lid);

	//下棋还款日
	int paydate(int lid);

	//查询贷款信息
	List<Payloan> paylist(int lid);

	//查询贷款信息
	int updateloan(@Param("repayment") double repayment, @Param("lid") int lid);

	//修改贷款信息
	int updatepay(Payloan payloan);

	//添加贷款信息
	int addpayloan(@Param("pln") Payloan payloan, @Param("payint") int payint);

	//修改贷款信息
	int updatepayall(Payloan payloan);


	//查询未还贷款信息
	List<Payloan> nopaylist(@Param("lid") int lid, @Param("paystate") int paystate);

	void addpubliceimf(Publicimf publicimf);

	//添加车辆信息
	void addcarimf(Carimf carimf);

	void updusermoney(@Param("id")int id,@Param("money")double money);

	//查询所有车辆
	List<Map> selectcarimf(int uid);

	//查询抵押所有车辆
	List<Map> diyacarimf(@Param("uid") int uid, @Param("carapplyid") int carapplyid, @Param("carowner") int carowner);

	//查询抵押所有房
	List<Map> diyahouseimf(@Param("uid") int uid, @Param("houseapplyid") int houseapplyid, @Param("houseowner") int houseowner);

	//判断当前有没有车辆信息
	List<Map> carisnull(String caridcard);

	//添加房信息
	void addhouseimf(Houseimf houseimf);

	//查询所有房信息
	List<Map> selecthouseimf(int uid);


	//判断是否有房子信息
	List<Map> houseisnull(String housedata);

	//查看公积金
	Publicimf selectpublic(int uid);

	//判断公积金
	Publicimf selectpublic(@Param("uid") int uid, @Param("publicsmoney") String publicsmoney);

	//添加保险
	void addinsuranceimf(Insuranceimf insuranceimf);

	//查看保险
	Insuranceimf selectinsuranceimf(int uid);

	//查询所有车辆
	List<Map> selectcarimf_user(@Param("uid") int uid, @Param("carowner") int carowner);


	//修改车辆
	void updatecarimf_user(@Param("caridcard") int caridcard, @Param("carapplyid") int carapplyid);

	//修改房主
	void updatehouseimf_user(@Param("houseid") int houseid, @Param("houseapplyid") int houseapplyid);

	int updateuser(@Param("id") int id, @Param("money") Double money);


	int updateuserlimit(@Param("id") int id, @Param("money") Double money);
}
